package com.serivceImpl;

import com.javabean.SysLog;
import com.mapper.SyslogMapper;
import com.service.SyslogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SyslogServiceImpl implements SyslogService {

    @Autowired
    SyslogMapper syslogMapper;
    @Override
    public List<SysLog> findAll() {
        return syslogMapper.selectAll();
    }

    @Override
    public List<SysLog> findAll(String username, String url) {
        return syslogMapper.selectLikeUsernameAndUrl(username,url);
    }

    @Override
    public void add(SysLog sysLog) {
        syslogMapper.insertSyslog(sysLog);
    }
}
